package de.tabuma.pm.htmlcontent.entity;

import javax.jdo.*;
import javax.jdo.annotations.*;
import com.google.appengine.api.datastore.Text;

/**
 *
 * @author alefen
 */
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class HtmlContent {

    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    Long id;
    public Long getId() {
        return id;
    }

    @Persistent
    int projectnavigationId;
    public int getProjectnavigationId() {
        return projectnavigationId;
    }
    public void setProjectnavigationId(int projectnavigationId) {
        this.projectnavigationId = projectnavigationId;
    }

    @Persistent
    String content;
    public String getContent() {
        return content;
    }

    @Persistent
    Text text;
    public Text getText() {
        if(this.text==null && this.content!=null) {
            return new Text(this.content);
        }
        return text;
    }
    public void setText(Text text) {
        this.text = text;
    }

}
